import Cookies from "js-cookie"
const actions = {
    showLeftMenu({ commit }, status) {
        commit('showLeftMenu', status)
    },
    showLoading({ commit }, status) {
        commit('showLoading', status)
    },
    setMenus({ commit }, menus) {
        commit('setMenus', menus)
    },
  
    /* 保存用户权限 */
    setRules({ commit }, rules) {
        commit('setRules', rules)
    },
  
    setUsers({ commit }, users) {
        commit('setUsers', users)
    },
    setUserGroups({ commit }, userGroups) {
        commit('setUserGroups', userGroups)
    },
    setOrganizes({ commit }, organizes) {
        commit('setOrganizes', organizes)
    },
  
    /* 存储用户权限 */
    setRoles({ commit }, roles) {
        commit('setRoles', roles)
     },
  
/* 设置登录人员id */  
  setUserId({ commit }, userId) {
    commit('setUserId', userId)
},
  
  /* 设置登录token */  
  setToken({ commit }, token) {
    commit('setToken', token)
  },

  /* 设置登录人员用户名 */  
    setUserName({ commit }, userName) {
        userName = userName || Cookies.get('userName')
        commit('setUserName', userName)
    },

  /* 设置登录人员工号 */  
    setUserStaffNum({ commit }, staffNum) {
        commit('setUserStaffNum', staffNum)
    },

  /* 设置登录人员id */  
  setLoginUserId({ commit }, loginUserId) {
        commit('setLoginUserId', loginUserId)
    },

  /* 设置履历基本信息是否全部填写完毕 */  
  setFinishedReMsg({ commit }, isFinishedReMsg) {
        commit('setFinishedReMsg', isFinishedReMsg)
    },

  /* 设置登录人员头像照片路径 */  
  setPhotoPath({ commit },photoPath) {
        commit('setPhotoPath',photoPath)
    },

  /* 存储普通用户 / 管理员判别标识 */  
  setIsAdmin({ commit },isAdmin) {
        commit('setIsAdmin',isAdmin)
    },
}



export default actions
